Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix driver build for RHEL 7.7/4.13+ w/CONFIG_VIRT_CPU_ACCOUNTING_GEN #1471

Merged
merged 3 commits into from
Aug 9, 2019

Conversation

gnosek
Copy link
Contributor

@gnosek gnosek commented Aug 8, 2019

Kernel commits 60a9ce57e7c5ac1df3a39fb941022bbfa40c0862
and bac5b6b6b11560f323e71d0ebac4061cfe5f56c0 move the vtime_* fields
from task_struct to a nested struct vtime.

RHEL 7.7 is the first kernel where we hit this but the changes landed
in upstream kernel 4.13.

To hit this bug, CONFIG_VIRT_CPU_ACCOUNTING_GEN has to be set.

@@ -48,15 +49,26 @@ void ppm_task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *
#endif

#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)) || (PPM_RHEL_RELEASE_CODE > 0 && PPM_RHEL_RELEASE_CODE >= PPM_RHEL_RELEASE_VERSION(7, 7))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment would be nice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to the PPM_* macros but I'm not sure what I can say here that isn't already expressed by the code. If we're building for >= 4.13 or for RHEL >= 7.7, use the new macros, otherwise use the old ones.

driver/ppm_version.h Show resolved Hide resolved
Kernel commits 60a9ce57e7c5ac1df3a39fb941022bbfa40c0862
and bac5b6b6b11560f323e71d0ebac4061cfe5f56c0 move the vtime_* fields
from task_struct to a nested struct vtime.

RHEL 7.7 is the first kernel where we hit this but the changes landed
in upstream kernel 4.13.

To hit this bug, CONFIG_VIRT_CPU_ACCOUNTING_GEN has to be set.
RHEL 8.1 backports the definition of access_ok from 5.0.
@gnosek gnosek merged commit 45e7a73 into dev Aug 9, 2019
@gnosek gnosek deleted the rhel77-fix branch August 9, 2019 14:06
@IanLee1521
Copy link

Is there an ETA on a release with this fix included? We are running into this issue as well.

Cheers,

@watson6282
Copy link

Based off the release notes, it looks like this went into release tag 0.26.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants